package ooday02.homework.PersonCase;

public class Teacher extends Person {
    double salary;

    Teacher() {
    }

    Teacher(String name, int age, String address, double salary) {
        super(name, age, address);
        this.salary = salary;
    }

    void teach() {
        System.out.println(name + "正在认真讲课中...");
    }

    @Override
    void sayHi() {
        System.out.println(name + "今年" + age + "岁，住在" + address + "，工资为" + salary);
    }
}
